package com.peaksport.framework.base.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

import com.peaksport.framework.base.venum.BaseIntConverter;
import com.peaksport.framework.venum.BillBaseStatusEnum;
import com.peaksport.pkms.permit.entity.UserEntity;

import lombok.Getter;
import lombok.Setter;

@SuppressWarnings("serial")
@MappedSuperclass
@Getter
@Setter
public abstract class BillBaseEntity extends ObjectBaseEntity {
	
	@Column(name="FNumber", nullable=false,length=80)
	private String number;
	@Column(name="FBizDate")
	private Date bizDate;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FAuditorID")
	private UserEntity auditor;
	@Column(name="FAuditTime")
	private Date auditTime;
	@Convert(converter = BaseIntConverter.class)
	@Column(name = "FBaseStatus")
	private BillBaseStatusEnum baseStatus; 

	/** 分录 */
	public abstract List<?> getEntrys();
	
}
